@import 'theme';
.nav {
  user-select: none;
  text-align: center;
  height: 100%;
  width: 11rem;
  min-width: 12vw;
  overflow-y: auto;
  overflow-x: hidden;
  color: var(--nav-color);
  background-color: var(--nav-bg-color);
  border-right: 1px solid rgba(0, 0, 0, 0.1);
  .navItem {
    display: flex;
    align-items: center;
    position: relative;
    font-size: 1rem;
    padding-left: 1rem;
    height: 2rem;
    margin: 0 -1rem;
    margin-bottom: 10px;
    outline: none;
    cursor: pointer;
    border-right: 3px solid transparent;
    .categoryIcon {
      margin-right: 0.5rem;
      width: 1.2rem;
      min-width: 1.2rem;
      height: 1.2rem;
      background-size: 100%;
      background-repeat: no-repeat;
      background-position-x: 0, -100px;
      @each $v in $category-list {
        &.#{$v} {
          background-image: var(--nav-icon-#{$v});
        }
      }
    }
    &.active {
      border-right: 3px solid #2ca7f8;
      background-color: var(--nav-bg-color-active);
      color: #2ca7f8;
      .categoryIcon {
        background-position-x: -100px, 0px;
      }
    }
    &:not(.active):hover {
      background-color: rgba(0, 0, 0, 0.05);
    }
    .title {
      display: flex;
      align-items: center;
      flex-grow: 1;
      overflow: hidden;
      white-space: nowrap;
      span {
        text-overflow: ellipsis;
        overflow: hidden;
      }
    }
  }
  .hr {
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    margin-bottom: 6px;
  }
}
.downloadCount {
  width: 1.5rem;
  height: 1.5rem;
  margin: 0 0.5rem;
  color: #2ca7f8;
  border-radius: 50%;
  box-shadow: 0 0 0 1px var(--main-title-hr-color);
  &.rect {
    width: 20px;
    border-radius: 8px;
  }
}
